<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<link href="fileuploader.css" rel="stylesheet" type="text/css">	
    <style>    	
		body {font-size:13px; font-family:arial, sans-serif; width:700px; margin:100px auto;}
		.ui-progressbar-value { background-image: url(images/pbar-ani.gif); }
    </style>	
    <script type="text/javascript" src="../../jquery-1.4.4.min.js"></script>

    <!-- JQ UI -->
	<script type="text/javascript" src="../../jquery-ui/js/jquery-ui-1.8.8.custom.min.js"></script>
	<link rel="stylesheet" href="../../jquery-ui/css/smoothness/jquery-ui-1.8.8.custom.css" type="text/css" />

    <script type="text/javascript">
	$(function(){
		createUploader();

	});
	</script>
</head>
<body>		
    
	<div id="file-uploader-demo1">		
		<noscript>			
			<p>Please enable JavaScript to use file uploader.</p>
			<!-- or put a simple form for upload here -->
       	</noscript>         
	</div>
    <div id="progressbar"></div>
    <div id="fileNames"></div>
    
    <script src="fileuploader.js" type="text/javascript"></script>
    <script>        
        function createUploader(){            
            var uploader = new qq.FileUploader({
                element: document.getElementById('file-uploader-demo1'),
                action: '../server/php.php',
                debug: false,
				multiple: true,
				//showMessage: true,
				sizeLimit: 500000,
				onProgress: function(id, fileName, loaded, total)
							{
								//var per = 100;
								$("#fileNames").append(fileName + "<br>")
								$( "#progressbar" ).progressbar({
									value: (loaded/total)*100
								});
							},
				onCancel: function(id, fileName)
					      {
							$( "#progressbar" ).slideUp();
						  },
				onComplete: function(id, fileName)
					      {
							//$( "#progressbar" ).slideUp(1000);
						  }
							
            });           
        }
        
        // in your app create uploader as soon as the DOM is ready
        // don't wait for the window to load  
        //window.onload = createUploader;     
    </script>    
</body>
</html>